import React, { Component } from 'react';

export default class Text extends Component {
  static defaultProps = {
    content: '<p>双击此处进行编辑</p>',
  };

  render() {
    return (
      <div
        className="editor-content"
        onMouseUp={this.props.onMouseUp}
        ref={e => (this.editor = e)}
        contentEditable
        dangerouslySetInnerHTML={{ __html: this.props.content }}
      />
    );
  }
}
